package org.shj.book2.chapter11;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class ThreadSpecifyLog {
	
	private PrintWriter writer = null;

	public ThreadSpecifyLog(String filename){
		try{
			writer = new PrintWriter(new FileWriter(filename));
			
		}catch(IOException e){
			e.printStackTrace();
		}
	}
	
	public void println(String s){
		writer.println(s);
	}
	
	public void close(){
		writer.println("========= End of Log ========");
		writer.close();
	}
}
